<script>
	import * as storage from '@/util/storage.js'
	import Vue from 'vue'
	export default {
		onLaunch() {
			uni.getSystemInfo({
				success: (e) => {
					// #ifndef MP
					if (e.platform == 'android') {
						storage.setCustomBarHeight(e.statusBarHeight + 50)
					} else {
						storage.setCustomBarHeight(e.statusBarHeight + 45)
					};
					// #endif
					// #ifdef MP-WEIXIN || MP-QQ
					const capsule = wx.getMenuButtonBoundingClientRect();
					if (capsule) {
						storage.setCustomBarHeight(capsule.bottom + capsule.top - e.statusBarHeight)
					} else {
						storage.setCustomBarHeight(e.statusBarHeight + 50)
					}
					// #endif		
					// #ifdef MP-ALIPAY
					storage.setCustomBarHeight(e.statusBarHeight + e.titleBarHeight)
					// #endif

					storage.setStatusBarHeight(e.statusBarHeight)
					storage.setScreenWidth(e.screenWidth)
					storage.setScreenHeight(e.screenHeight)
				}
			})
		},
		onShow() {},
		onHide() {}
	};
</script>

<style>
	@import url('/static/index.css');
	@import url('/static/icon/iconfont.css');
	/* #ifndef APP-PLUS-NVUE */
	@import 'components/colorui/main.css';
	@import 'components/colorui/icon.css';
	/* #endif */
	/* @import 'components/font-awesome.min.css'; */

	/* 解决头条小程序组件内引入字体不生效的问题 */
	/* #ifdef MP-TOUTIAO */
	@font-face {
		font-family: uniicons;
		src: url('/static/uni.ttf');
	}

	/* #endif */
</style>
